{extends file="./main.tpl"}
{block name=head}
<link href="css/user.css" rel="stylesheet" type="text/css" />
<script src="./js/jquery.min.js">
</script>
<script type="text/javascript">
function myFunction()
{
	if(confirm("Are You Sure To Delete")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name="body"}
<form action="{$smarty.server.PHP_SELF}" method="POST" class="register"> 
<body>
<table align="center">
<h1 align="center" style="font-size:px; color:#5BA7E9;">Price List</h1>
<tr>
  <label>
    <select name="itemName">
      <option value="">Select&nbsp;Item</option>
      {html_options values=$itemArray.itemName output=$itemArray.itemName}
    </select>
  </label>
</tr>
<tr>
	<td><input type="text" name="itemPrice" class="text-field" placeholder="Item Price" required></td><br />
</tr>
<tr>
	<td colspan="3" align="center"><input type="submit" name="submit" value="Submit" class="button"></td>
</tr>
</table>
</body>
<br/>
<br/>
<table align="center" border="1" cellpadding="3" cellspacing="0">
	<tr>
	  <td colspan="12"><h1 align="center" style="color:#5BA7E9;">Price List</h1></td>	
  </tr>
	<tr style="font-style:normal; color:#a6a6a6; font-size:17px;">
		<td align="center">&nbsp;</td>
		<td align="center"><b>Item&nbsp;Name</b></td>
		<td align="center"><b>Item&nbsp;Price</b></td>
  </tr>
  {section name="sec" loop=$priceArray}
  <tr>
  	<td align="center"><a href="priceDelete.php?priceId={$priceArray[sec].priceId}" style="font-size:15px; color:#5BA7E9; text-decoration: none;" onclick="return myFunction();"><b>Delete</b></a></td>
  	<td align="center">{$priceArray[sec].itemName}</td>
  	<td align="center">{$priceArray[sec].itemPrice}</td>
  </tr>
 {/section}
</table>
</form>
{/block}
